from multiprocessing import Process
from time import sleep

def run_pro(name,age,*args,**kwargs):
    for i in range(5):
        print('子进程进行第{}次执行中，参数name：{},age:{}'.format(i,name,age))
        print('字典参数Kwargs:',kwargs)
        sleep(1)

if __name__ == "__main__":
    print('主进程执行')
    p = Process(target=run_pro,args=('test',24),kwargs={'m':23})
    p.start()
   
    # p.join()
   
    # 获取进程ID
    print('进程ID：',p.pid)
    # 获取进程名字
    print('进程name',p.name)

    # 判断进程是否运行
    print('p.is_alive',p.is_alive())

    print('end....')